﻿using System.Web.Optimization;
using Turquoise.Helpers;

namespace Turquoise.Web.Management
{

    public class BundleConfig
    {


        private static string CurrentTheme => ConfigurationHelper.GetAppSetting("DefaultTheme");

        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(
                new StyleBundle("~/Styles/bootstrap").Include(
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/bootstrap.min.css",
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/font-awesome.min.css",
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/font-glyphicons.css",
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/bootstrap-multiselect.css"
            ));


            bundles.Add(
               new StyleBundle("~/Styles/admin").Include(
                   "~/Assets/Themes/" + CurrentTheme + "/Styles/metisMenu.min.css",
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/common.css"
                   ));

            bundles.Add(
                new StyleBundle("~/Styles/datatable").Include(
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/jquery.dataTables.min.css",
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/dataTables.bootstrap.css"
                    ));


            bundles.Add(
                new StyleBundle("~/Styles/home").Include(
                "~/Assets/Themes/" + CurrentTheme + "/Styles/home.css"
                    ));

            bundles.Add(
                new StyleBundle("~/Styles/content").Include(
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/datepicker.css",
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/select2.css",
                    "~/Assets/Themes/" + CurrentTheme + "/Styles/content.css"
                    ));


            bundles.Add(
                new ScriptBundle("~/Scripts/bootstrap").Include(
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/jquery-2.2.0.min.js",
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/bootstrap.min.js",
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/bootstrap-multiselect.js"

                    ));

            bundles.Add(
                new ScriptBundle("~/Scripts/fix").Include(
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/respond.min.js",
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/html5shiv.min.js",
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/placeholder-IE-fixes.js"
                    ));

            bundles.Add(
               new ScriptBundle("~/Scripts/admin").Include(
                   "~/Assets/Themes/" + CurrentTheme + "/Scripts/metisMenu.min.js",
                   "~/Assets/Themes/" + CurrentTheme + "/Scripts/confirm-bootstrap.js",
                   "~/Assets/Themes/" + CurrentTheme + "/Scripts/jquery.countdown.js",
                   "~/Assets/Themes/" + CurrentTheme + "/Scripts/common.js"

                   ));

            bundles.Add(
                new ScriptBundle("~/Scripts/datatable").Include(
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/jquery.dataTables.min.js",
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/dataTables.bootstrap.js",
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/jquery-sortable.js"
                    ));

            bundles.Add(
                new ScriptBundle("~/Scripts/home").Include(
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/home.js"
                    ));


            bundles.Add(
                new ScriptBundle("~/Scripts/content").Include(
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/bootstrap-datepicker.js",
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/select2.min.js",
                    "~/Assets/Themes/" + CurrentTheme + "/Scripts/content.js"
                    ));


        }
    }
}